# Link object files to make the executable

# -lpthread is needed to use pthread.h
 
BufferManagerTest: BufferManagerTest.o BufferManager.o BufferFrame.o
	g++ -g -o BufferManagerTest BufferManagerTest.o BufferManager.o BufferFrame.o -lpthread

# Compile object file

BufferFrame.o: buffer/BufferFrame.cpp buffer/BufferFrame.hpp
	g++ -O3 -std=c++0x -c buffer/BufferFrame.cpp

BufferManager.o: buffer/BufferManager.cpp buffer/BufferManager.hpp buffer/BufferFrame.hpp
	g++ -O3 -std=c++0x -c buffer/BufferManager.cpp

BufferManagerTest.o: testing/BufferManagerTest.cpp buffer/BufferManager.hpp buffer/BufferFrame.hpp
	g++ -O3 -std=c++0x -c testing/BufferManagerTest.cpp

#BufferFrame.o: buffer/BufferFrame.cpp buffer/BufferFrame.hpp
#	g++ -O0 -g -Wall -std=c++0x -c buffer/BufferFrame.cpp
#
#BufferManager.o: buffer/BufferManager.cpp buffer/BufferManager.hpp buffer/BufferFrame.hpp
#	g++ -O0 -g -Wall -std=c++0x -c buffer/BufferManager.cpp
#
#BufferManagerTest.o: testing/BufferManagerTest.cpp buffer/BufferManager.hpp buffer/BufferFrame.hpp
#	g++ -O0 -g -Wall -std=c++0x -c testing/BufferManagerTest.cpp

all:	BufferManagerTest

clean:
	rm BufferFrame.o BufferManager.o BufferManagerTest.o
